<template>
  <div>
    <el-card  class="operator-button-card">
      <template #header>
        <div class="flex justify-between items-center">
          <h2 class="operator-button-label">
            {{ $t('operator.blacklist')
            }}<el-tooltip
              class="item"
              effect="dark"
              :content="$t('black_list.conflict_tip')"
              placement="top-start"
              ><svg-icon icon-class="Warning" style="margin-left: 6px"/>
            </el-tooltip>
          </h2>
          <div>
            <el-button
              v-if="isAuth('10400202.MANAGE')"
              type="primary"
              size="small"
              @click="clickHandle"
              >{{ $t('common.set') }}</el-button
            >
          </div>
        </div></template
      >

      <el-form ref="dataForm" label-width="120px">
        <div class="flex">
          <svg-icon
            icon-class="Warning"
            style="color:var(--color-gray-7); font-size: 20px; margin-right: 10px"
          />
          <span class="toolbar-text">
            {{ $t('operator.blacklist_tip') }}
          </span>
        </div>
      </el-form>
    </el-card>
    <blocklist-dialog-vue
      @close="treeVisible = false"
      v-model="treeVisible"
      :title="$t('operator.permissionsBtn')"
      :operator-id="operatorId"
    />
  </div>
</template>

<script>
import blocklistDialogVue from './blocklist-dialog.vue'
import { isAuth } from '@/utils'

export default {
  components: {
    blocklistDialogVue
  },
  props: ['operatorId'],
  data() {
    return {
      form: [],
      treeVisible: false
    }
  },
  methods: {
    clickHandle() {
      this.treeVisible = true
    },
    isAuth
  }
}
</script>

<style lang="scss" scoped>
.l-card {
  margin: 20px 36px;
}

.toolbar-text {
  /*color: #ccd3d9;*/
  --tw-text-opacity: 1;
  color: rgba(149, 170, 201, var(--tw-text-opacity));
  font-size: 14px;
}
</style>
